object fDeletaLancamentos: TfDeletaLancamentos
  Left = 345
  Top = 211
  Width = 700
  Height = 500
  Caption = 'Deletar Im'#243'veis Repetidos..'
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = False
  Position = poDesktopCenter
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  object FlatGauge1: TFlatGauge
    Left = 16
    Top = 401
    Width = 609
    Height = 25
    AdvColorBorder = 0
    ColorBorder = 8623776
    Progress = 0
    Visible = False
  end
  object JvDBGrid1: TJvDBGrid
    Left = 0
    Top = 202
    Width = 692
    Height = 223
    Align = alClient
    DataSource = dImovel
    Options = [dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit]
    TabOrder = 0
    TitleFont.Charset = DEFAULT_CHARSET
    TitleFont.Color = clWindowText
    TitleFont.Height = -11
    TitleFont.Name = 'MS Sans Serif'
    TitleFont.Style = []
    OnDrawColumnCell = JvDBGrid1DrawColumnCell
    OnDblClick = JvDBGrid1DblClick
    AutoSizeColumns = True
    SelectColumnsDialogStrings.Caption = 'Select columns'
    SelectColumnsDialogStrings.OK = '&OK'
    SelectColumnsDialogStrings.NoSelectionWarning = 'At least one column must be visible!'
    EditControls = <>
    RowsHeight = 17
    TitleRowHeight = 17
    Columns = <
      item
        Expanded = False
        FieldName = 'COD_IMALU'
        Title.Caption = 'KEY'
        Width = 30
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'RUA'
        Width = 212
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'NR'
        Width = 28
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'COMPL'
        Width = 80
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'BAIRRO'
        Width = 247
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'CASE'
        Title.Caption = 'Situa'#231#227'o'
        Width = 73
        Visible = True
      end>
  end
  object JvDBGrid2: TJvDBGrid
    Left = 0
    Top = 0
    Width = 692
    Height = 202
    Align = alTop
    DataSource = dProp
    Options = [dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit]
    TabOrder = 1
    TitleFont.Charset = DEFAULT_CHARSET
    TitleFont.Color = clWindowText
    TitleFont.Height = -11
    TitleFont.Name = 'MS Sans Serif'
    TitleFont.Style = []
    OnKeyDown = JvDBGrid2KeyDown
    OnKeyUp = JvDBGrid2KeyUp
    OnMouseDown = JvDBGrid2MouseDown
    OnMouseUp = JvDBGrid2MouseUp
    AutoSizeColumns = True
    SelectColumnsDialogStrings.Caption = 'Select columns'
    SelectColumnsDialogStrings.OK = '&OK'
    SelectColumnsDialogStrings.NoSelectionWarning = 'At least one column must be visible!'
    EditControls = <>
    RowsHeight = 17
    TitleRowHeight = 17
    Columns = <
      item
        Expanded = False
        FieldName = 'COD_PROPRIETARIO'
        Visible = False
      end
      item
        Expanded = False
        FieldName = 'NOME_PROPRIETARIO'
        Title.Caption = 'Propriet'#225'rios'
        Width = 675
        Visible = True
      end>
  end
  object Panel1: TPanel
    Left = 0
    Top = 425
    Width = 692
    Height = 41
    Align = alBottom
    TabOrder = 2
    object BitBtn3: TBitBtn
      Left = 204
      Top = 8
      Width = 137
      Height = 25
      Caption = 'Deleta'
      TabOrder = 0
      OnClick = BitBtn3Click
    end
    object BitBtn4: TBitBtn
      Left = 352
      Top = 8
      Width = 137
      Height = 25
      Caption = 'Sair'
      TabOrder = 1
      OnClick = BitBtn4Click
    end
  end
  object sLanc: TSQLDataSet
    CommandText = 'select COD_LANCAMENTO, COD_IMALU '#13#10' from LANCAMENTOS'
    MaxBlobSize = -1
    Params = <>
    SQLConnection = DM.scSge
    Left = 32
    Top = 290
    object sLancCOD_LANCAMENTO: TIntegerField
      FieldName = 'COD_LANCAMENTO'
      Required = True
    end
    object sLancCOD_IMALU: TIntegerField
      FieldName = 'COD_IMALU'
    end
  end
  object sImo: TSQLDataSet
    CommandText = 
      'select cod_imalu, alugado from imovel_aluguel'#13#10'        where cod' +
      '_imalu = :id'
    MaxBlobSize = -1
    Params = <
      item
        DataType = ftInteger
        Name = 'id'
        ParamType = ptInput
      end>
    SQLConnection = DM.scSge
    Left = 32
    Top = 320
    object sImoCOD_IMALU: TIntegerField
      FieldName = 'COD_IMALU'
      Required = True
    end
    object sImoALUGADO: TStringField
      FieldName = 'ALUGADO'
      Size = 1
    end
  end
  object sImovel: TSQLDataSet
    CommandText = 
      'select i.COD_IMALU, '#13#10'          i.COMPL, '#13#10'          i.ALUGADO,'#13 +
      #10'          CASE WHEN i.ALUGADO = '#39'S'#39' THEN '#39'ALUGADO'#39'   '#13#10'        ' +
      '            WHEN i.ALUGADO <> '#39'S'#39' THEN '#39'DISPONIVEL'#39' END, '#13#10'     ' +
      '     i.NR, i.BAIRRO, c.RUA, p.NOME_PROPRIETARIO            '#13#10'fro' +
      'm IMOVEL_ALUGUEL i '#13#10'inner join  CEP c on c.COD_CEP = i.COD_ENDE' +
      'RECO '#13#10'inner join  PROPRIETARIOS p on p.COD_PROPRIETARIO = i.COD' +
      '_PROPRIETARIO '#13#10'where i.COD_PROPRIETARIO = :id '#13#10'order by c.RUA'#13 +
      #10#13#10
    MaxBlobSize = -1
    Params = <
      item
        DataType = ftInteger
        Name = 'id'
        ParamType = ptInput
      end>
    SQLConnection = DM.scSge
    Left = 72
    Top = 288
    object sImovelCOMPL: TStringField
      FieldName = 'COMPL'
      Size = 15
    end
    object sImovelNR: TStringField
      FieldName = 'NR'
      Size = 5
    end
    object sImovelBAIRRO: TStringField
      FieldName = 'BAIRRO'
      Size = 80
    end
    object sImovelRUA: TStringField
      FieldName = 'RUA'
      Size = 50
    end
    object sImovelNOME_PROPRIETARIO: TStringField
      FieldName = 'NOME_PROPRIETARIO'
      Size = 60
    end
    object sImovelCOD_IMALU: TIntegerField
      FieldName = 'COD_IMALU'
      Required = True
    end
    object sImovelCASE: TStringField
      FieldName = 'CASE'
      ReadOnly = True
      FixedChar = True
      Size = 10
    end
    object sImovelALUGADO: TStringField
      FieldName = 'ALUGADO'
      Size = 1
    end
  end
  object pImovel: TDataSetProvider
    DataSet = sImovel
    UpdateMode = upWhereKeyOnly
    Left = 104
    Top = 288
  end
  object cImovel: TClientDataSet
    Aggregates = <>
    Params = <
      item
        DataType = ftInteger
        Name = 'id'
        ParamType = ptInput
      end>
    ProviderName = 'pImovel'
    Left = 136
    Top = 288
    object cImovelCOMPL: TStringField
      FieldName = 'COMPL'
      Size = 15
    end
    object cImovelNR: TStringField
      FieldName = 'NR'
      Size = 5
    end
    object cImovelBAIRRO: TStringField
      FieldName = 'BAIRRO'
      Size = 80
    end
    object cImovelRUA: TStringField
      FieldName = 'RUA'
      Size = 50
    end
    object cImovelNOME_PROPRIETARIO: TStringField
      FieldName = 'NOME_PROPRIETARIO'
      Size = 60
    end
    object cImovelCOD_IMALU: TIntegerField
      FieldName = 'COD_IMALU'
      Required = True
    end
    object cImovelCASE: TStringField
      FieldName = 'CASE'
      ReadOnly = True
      FixedChar = True
      Size = 10
    end
    object cImovelALUGADO: TStringField
      FieldName = 'ALUGADO'
      Size = 1
    end
  end
  object dImovel: TDataSource
    DataSet = cImovel
    Left = 168
    Top = 288
  end
  object sProp: TSQLDataSet
    CommandText = 
      'select COD_PROPRIETARIO, NOME_PROPRIETARIO '#13#10'from PROPRIETARIOS ' +
      'order by NOME_PROPRIETARIO'
    MaxBlobSize = -1
    Params = <>
    SQLConnection = DM.scSge
    Left = 136
    Top = 64
    object sPropCOD_PROPRIETARIO: TIntegerField
      FieldName = 'COD_PROPRIETARIO'
      Required = True
    end
    object sPropNOME_PROPRIETARIO: TStringField
      FieldName = 'NOME_PROPRIETARIO'
      Size = 60
    end
  end
  object pProp: TDataSetProvider
    DataSet = sProp
    UpdateMode = upWhereKeyOnly
    Left = 168
    Top = 64
  end
  object cProp: TClientDataSet
    Aggregates = <>
    Params = <>
    ProviderName = 'pProp'
    Left = 200
    Top = 64
    object cPropCOD_PROPRIETARIO: TIntegerField
      FieldName = 'COD_PROPRIETARIO'
      Required = True
    end
    object cPropNOME_PROPRIETARIO: TStringField
      FieldName = 'NOME_PROPRIETARIO'
      Size = 60
    end
  end
  object dProp: TDataSource
    DataSet = cProp
    Left = 232
    Top = 64
  end
end
